package com.cmwa.scbp.sys.msg.vo;

import java.util.ArrayList;
import java.util.List;

import org.apache.ibatis.type.Alias;
@Alias("MsgBatchVo")
public class MsgBatchVo {
	private String id;
	private String type;
	private String startTime;
	private String endTime;
	private String elapsedTime;
	private String rst;

	
	private List<MsgSendVo> msgs;
	
	
	public MsgBatchVo(){}
	public MsgBatchVo(String id, String type, String startTime,
			String endTime, String elapsedTime, String rst) {
		super();
		this.id = id;
		this.type = type;
		this.startTime = startTime;
		this.endTime = endTime;
		this.elapsedTime = elapsedTime;
		this.rst = rst;
	}
	
	
	
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getStartTime() {
		return startTime;
	}
	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}
	public String getEndTime() {
		return endTime;
	}
	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}
	public String getElapsedTime() {
		return elapsedTime;
	}
	public void setElapsedTime(String elapsedTime) {
		this.elapsedTime = elapsedTime;
	}
	public String getRst() {
		return rst;
	}
	public void setRst(String rst) {
		this.rst = rst;
	}
	
	
	public List<MsgSendVo> getMsgs() {
		return msgs;
	}
	public void setMsgs(List<MsgSendVo> msgs) {
		this.msgs = msgs;
	}
	public void addMsgs(List<MsgSendVo> msgs) {
		if(this.msgs==null){
			this.msgs=msgs;
		}else{
			this.msgs.addAll(msgs);
		}
	}
	public void addMsgs(MsgSendVo msg) {
		if(this.msgs==null){
			this.msgs = new ArrayList<MsgSendVo>();
		}
		this.msgs.add(msg);
	}
	
	
	
	@Override
	public String toString() {
		return "MsgBatchVo [id=" + id + ", type=" + type + ", startTime="
				+ startTime + ", endTime=" + endTime + ", elapsedTime="
				+ elapsedTime + ", rst=" + rst + "]";
	}
	
}
